/*****************************************************************************/
/**
 *  @file   main.cpp
 *  @author Naohisa Sakamoto
 */
/*----------------------------------------------------------------------------
 *
 *  Copyright (c) Visualization Laboratory, Kyoto University.
 *  All rights reserved.
 *  See http://www.viz.media.kyoto-u.ac.jp/kvs/copyright/ for details.
 *
 *  $Id$
 */
/*****************************************************************************/
#include <kvs/Directory>
#include <kvs/AVSField>
#include <util/SPHFileList.h>
#include <util/SPHFileListToAVSField.h>
#include <string>


int main( int argc, char** argv )
{
    const std::string dirname( argv[1] );
    const bool header_only = true;

    kvsbloodvis::util::SPHFileList sph_list( dirname, header_only );
    kvs::AVSField avs = kvsbloodvis::util::SPHFileListToAVSField( sph_list );
    avs.write( kvs::Directory( dirname ).directoryName() + ".fld" );
    avs.print( std::cout << std::endl );
}
